package com.atguigu.guli.service.base.handler;

import com.atguigu.guli.service.base.result.ResultCodeEnum;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

@Data
@Slf4j
public class GuliException extends RuntimeException {
    private ResultCodeEnum resultCodeEnum ;
    private Exception e ;

    public GuliException(ResultCodeEnum resultCodeEnum) {
        super(resultCodeEnum.getMessage()) ;
        this.resultCodeEnum = resultCodeEnum ;
//        this.e = this ;
    }

    public GuliException(ResultCodeEnum resultCodeEnum,Exception e) {
        super(e.getMessage()) ;
        this.resultCodeEnum = resultCodeEnum ;
        this.e = e ;
    }
}
